//part1:C04:ex4.2.cpp
#include <iostream>
#include <vector>
#include <ctime>
#include <cstdlib>

int main(void)
{
  using namespace std;
  vector<int> vec;
  srand((unsigned)time(NULL));
  cout << "auto generate some elements of an array..." << endl;
  for (int i = 0; i != 10; i++)
  {
    vec.push_back(rand() % 100);    
  }
  cout << endl;
  cout << "test brace is true or not:\n";
  cout << "*vec.begin() is: " << *vec.begin() << endl;
  cout << "*(vec.begin()) is:" << *(vec.begin()) << endl;
  cout << "*vec.begin()+1 is:" << *vec.begin()+1 << endl;
  cout << "(*(vec.begin()))+1 is:" << (*(vec.begin()))+1 << endl;

  return 0;
}

